home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / Epeg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-01-09  |  1.9 KB  |  55 lines

  1. #ifndef _EPEG_H
  2. #define _EPEG_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8.    typedef enum _Epeg_Colorspace
  9.      {
  10.     EPEG_GRAY8,
  11.       EPEG_YUV8,
  12.       EPEG_RGB8,
  13.       EPEG_BGR8,
  14.       EPEG_RGBA8,
  15.       EPEG_BGRA8,
  16.       EPEG_ARGB32,
  17.       EPEG_CMYK
  18.      }
  19.    Epeg_Colorspace;
  20.    
  21.    typedef struct _Epeg_Image          Epeg_Image;
  22.    typedef struct _Epeg_Thumbnail_Info Epeg_Thumbnail_Info;
  23.  
  24.    struct _Epeg_Thumbnail_Info
  25.      {
  26.     char                   *uri;
  27.     unsigned long long int  mtime;
  28.     int                     w, h;
  29.     char                   *mimetype;
  30.      };
  31.    
  32.    Epeg_Image   *epeg_file_open                 (const char *file);
  33.    Epeg_Image   *epeg_memory_open               (unsigned char *data, int size);
  34.    void          epeg_size_get                  (Epeg_Image *im, int *w, int *h);
  35.    void          epeg_decode_size_set           (Epeg_Image *im, int w, int h);
  36.    void          epeg_decode_colorspace_set     (Epeg_Image *im, Epeg_Colorspace colorspace);
  37.    const void   *epeg_pixels_get                (Epeg_Image *im, int x, int y, int w, int h);
  38.    void          epeg_pixels_free               (Epeg_Image *im, const void *data);
  39.    const char   *epeg_comment_get               (Epeg_Image *im);
  40.    void          epeg_thumbnail_comments_get    (Epeg_Image *im, Epeg_Thumbnail_Info *info);
  41.    void          epeg_comment_set               (Epeg_Image *im, const char *comment);
  42.    void          epeg_quality_set               (Epeg_Image *im, int quality);
  43.    void          epeg_thumbnail_comments_enable (Epeg_Image *im, int onoff);
  44.    void          epeg_file_output_set           (Epeg_Image *im, const char *file);
  45.    void          epeg_memory_output_set         (Epeg_Image *im, unsigned char **data, int *size);
  46.    int           epeg_encode                    (Epeg_Image *im);
  47.    int           epeg_trim                      (Epeg_Image *im);
  48.    void          epeg_close                     (Epeg_Image *im);
  49.    
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53.  
  54. #endif
  55.